/**
 * Created by smile on 2017/3/23.
 */

public class Student {
    private String name;
    private int ID;
    private static int javaGrade;
    public Student(String name, int ID,int javaGrade) {
        super();
        this.name = name;
        this.ID = ID;
        this.javaGrade=javaGrade;
    }


    public String toString() {
        return this.name + "," + ID+ "," + javaGrade;
    }
    public boolean equals(Student obj) {
        if(obj==null)
            return false;
        else if((this.ID==obj.ID)&&(this.name==obj.name))
            return true;
        else
            return false;
    }
    public static void main(String[] args){
        Student st1=new Student("Danny",20175301, javaGrade);
        Student st2=new Student("Jenny",20175302, javaGrade);
        
        System.out.println(st1);
        System.out.println(st2);
        
        if(st1.equals(st2)){
            System.out.println("same student");
        }
        else{
            System.out.println("not same student");
        }
    }
}